
package com.joolun.cloud.mall.api.controller;

import com.joolun.cloud.common.core.constant.SecurityConstants;
import com.joolun.cloud.common.core.util.R;
import com.joolun.cloud.mall.api.util.ApiUtil;
import com.joolun.cloud.mall.common.feign.FeignWxLiveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;

/**
 * 小程序直播
 *
 * @author www.joolun.com
 * @date 2019-03-23 21:26:35
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/wxmalive")
@Api(value = "wxmalive", tags = "小程序直播API")
public class WxMaLiveController {

	private final FeignWxLiveService feignWxLiveService;

	/**
	* 获取直播房间列表
	* @return
	*/
	@ApiOperation(value = "获取直播房间列表")
	@GetMapping("/roominfo/list")
	public R getWxMaterialList(HttpServletRequest request) {
		return feignWxLiveService.getWxRoominfoList(ApiUtil.getAppId(request), SecurityConstants.FROM_IN);
	}
}
